﻿using System;
using System.Collections.Generic;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.IO;
using System.Collections.Specialized;

public partial class Result : System.Web.UI.Page
{
    protected void Page_Load(object sender, EventArgs e)
    {
        NameValueCollection queryString = Request.QueryString;

        foreach (string i in queryString.Keys)
            if (i == "tkv")
                TextBox1.Text = "Tên khu vực : " + queryString[i];
            else if (i == "star")
                TextBox1.Text += "\r\nSố sao : " + queryString[i];
            else if (i == "nh")
                TextBox1.Text += "\r\nNhà hàng : " + queryString[i];
            else if (i == "tm")
                TextBox1.Text += "\r\nThang máy : " + queryString[i];
            else if (i == "lp")
                TextBox1.Text += "\r\nLoại phòng : " + queryString[i];
            else if (i == "dv")
                TextBox1.Text += "\r\nĐặt vé : " + queryString[i];
    }
    protected void Unnamed2_Click(object sender, EventArgs e)
    {
        Response.Clear();
        Response.ContentType = "application/excel";
        Response.AddHeader("Content-Disposition", "filename=dsachkhachmoi.xlsx");
        //FileStream fs = File.OpenRead(Server.MapPath("~/dsachkhachmoi.xlsx"));
        //byte[] bs = new byte[fs.Length];
        //fs.Read(bs, 0, (int) fs.Length);
        //Response.BinaryWrite(bs);
        Response.TransmitFile("~/dsachkhachmoi.xlsx");
        //Response.Flush();
        Response.End();
        //Response.End();
    }
}